//
//  MsgDetailController.m
//  Ten
//
//  Created by anfuer on 2018/8/25.
//  Copyright © 2018年 xg韦. All rights reserved.
//

#import "MsgDetailController.h"
#import "MsgCell.h"
@interface MsgDetailController ()
{
    NSArray*dataary;
}
@property (weak, nonatomic) IBOutlet UITableView *tbv;

@end

@implementation MsgDetailController

- (void)viewDidLoad {
    [super viewDidLoad];
    _tbv.separatorColor=[UIColor clearColor];
  
    [FuncPublic getData:self parameters:nil RequestUrl:Cusers_system_message success:^(NSDictionary *acountInfo) {
        dataary=acountInfo[@"data"];
        [_tbv reloadData];
        
    }];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
#pragma mark 返回每组行数
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return  dataary.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
{
    NSDictionary*dic=dataary[indexPath.row];
    static NSString *ID = @"MsgCell";
    MsgCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    cell.layView.layer.cornerRadius=5;
    cell.img.image=WXGImage(@"系统消息");
    cell.lb1.text=WXGStr(dic[@"title"]);
     cell.lb2.text=WXGStr(dic[@"content"]);
     cell.lb3.text=WXGStr(dic[@"add_time"]);
    return cell;

}


#pragma mark 设置每行高度
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 110;
}
#pragma mark 点击事件
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    
}

@end
